﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Nauka.engine
{
    class Position_string
    {
        public static string getString(Position p){
            string s;

            switch (p)
            {
                case Position.BB:
                    s = "BB";
                    break;
                case Position.BU:
                    s = "BU";
                    break;
                case Position.CO:
                    s = "CO";
                    break;
                case Position.MP1:
                    s = "MP1";
                    break;
                case Position.MP2:
                    s = "MP2";
                    break;
                case Position.MP3:
                    s = "MP3";
                    break;
                case Position.SB:
                    s = "SB";
                    break;
                case Position.UTG:
                    s = "UTG";
                    break;
                case Position.UTG1:
                    s = "UTG1";
                    break;
                default:
                    s = "UTG2";
                    break;
            }

            return s;
        }

        public static Position getPosition(String s)
        {
            Position p;

            switch (s)
            {
                case "BB":
                    p = Position.BB;
                    break;
                case "BU":
                    p = Position.BU;
                    break;
                case "CO":
                    p = Position.CO;
                    break;
                case "MP1":
                    p = Position.MP1;
                    break;
                case "MP2":
                    p = Position.MP2;
                    break;
                case "MP3":
                    p = Position.MP3;
                    break;
                case "SB":
                    p = Position.SB;
                    break;
                case "UTG":
                    p = Position.UTG;
                    break;
                case "UTG1":
                    p = Position.UTG1;
                    break;
                default:
                    p = Position.UTG2;
                    break;
            }
            return p;
        }
    }
}
